<div class="form">

<?php
	$parentmodel = Catalog::model()->findAll();
	$parentdata = CHtml::listData($parentmodel,'cid','cataname');
?>


<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'catalog-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'cataname'); ?>
		<?php echo $form->textField($model,'cataname',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'cataname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'parentid'); ?>
		<?php echo $form->dropDownList($model,'parentid',$parentdata); ?>
		<?php echo $form->error($model,'parentid'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'extra'); ?>
		<?php echo $form->textField($model,'extra',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'extra'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->